package com.jiesen.base.modules.certificate.textbook.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jiesen.base.baseDao.BaseModel;

import com.jiesen.base.utils.PageDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.xml.soap.Text;
import java.util.List;


/**
 * <p>
 * 
 * </p>
 *
 * @author bao
 */
@TableName("js_textbook")
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class TextBook extends PageDto {


	private static final long serialVersionUID=1L;

	@TableId(type = IdType.AUTO)
	private Integer id;
	private Integer parentId;  //"父级id"
	private String name;    //"名称"
	private Integer sorts;      //"排序"
	private String icon;        //"图标"
	private String describes;  //"描述"
    private Double amount;      //金额
    private Integer type;       //类型(1证书，2课本，3章节)

    @TableField(exist = false)
    private List<TextBook> child;   //子课本或章节（前端需要）


    public TextBook(Integer id, int parentId, String name, Integer sorts) {
        this.id = id;
        this.parentId = parentId;
        this.name = name;
        this.sorts = sorts;
    }
}
